#!/usr/bin/env bash
# 实例文件：checkstr
#
# if语句测试变量中的字符串长度是否为0


## -a 逻辑与 -o 逻辑或

# 使用命令行参数
VAR=$1
if[ -n "$VAR" ]
then
    echo has text
else
    echo zero length
fi

if [ -z "$VAR" ]
then
    echo zero length
else
    echo has text
fi
